package dream.design_pattern.ResponsibilityChain;

/**
 * projectName:java-garden
 * see:dream.design_pattern.ResponsibilityChain
 * createTime:2021/9/21 10:22
 * author: Jiading chen
 * description:
 */
public class Client {
    public static void main(String[] args) {
        Handler handler1 = new ConcreteHandler1(null);
        Handler handler2 = new ConcreteHandler1(handler1);
        Request request1 = new Request(RequestType.type1, "request1");
        handler2.handleRequest(request1);
        Request request2 = new Request(RequestType.type2, "request2");
        handler2.handleRequest(request2);
    }
}
